package com.qk.management.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author 16778
 * @date 2025/9/29 10:32
 * @description
 */
@Mapper
public interface DeptMapper {


    @Insert("insert into dept(name, status, create_time, update_time) " +
            "values(#{name},#{status},#{createTime},#{updateTime})")
    void InsertDept(Dept dept);

    Long count(String name, Integer status);

    List<Dept> selectByPage(String name, Integer status, Integer offset, Integer pageSize);


    List<Dept> list(String name,Integer status);

    @Select("select * from dept where id = #{id}")
    Dept selectById(Integer id);

    void update(Dept dept);

    @Delete("delete from dept where id = #{id}")
    void delete(Integer id);

    @Select("select * from dept")
    List<Dept> findAll();
}
